<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" session="true" %>
<%
	HttpSession actualSession = request.getSession(true);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/WhereIWas.dwt.jsp" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Where I Was - Index</title>
<!-- InstanceEndEditable -->
<link type="text/css" rel="stylesheet" href="/stylesheets/main.css"/>
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
</head>
<!-- InstanceBeginEditable name="bodytag" -->
<body>
<!-- InstanceEndEditable -->
<h1> Where I Was </h1>
<div id="centro">
	<div id="Menu">
			<div id="opciones"><table>
<%
				if(session.getAttribute("LoggedIn") != null){
%>
   					<tr> <td></td><td><a href="/view_log.jsp">View Log</a></td> <td></td><td></td><td></td><td></td>
<%
	}
%>
                    <td></td><td><a href="/help.jsp">View Where I Was Info</a><td><td></td><td></td><td></td>
                    <td></td><td colspan="3"><%= (String)session.getAttribute("UserName") %></td><td></td><td></td><td></td>
                    <td></td><td><a href="/register_location.jsp">Register Location</a><td></td><td></td><td></td><td></td><td></td><td></td>
                    <td></td></td><td><a href="/register_device.jsp">Register a Device</a></td><td></td><td></td><td></td><td></td>
                    <td></td><td></td><td colspan="3"><a href="/log_out">Log Out</a></td><td></td></tr>	
                </table>
	</div>
</div><!-- Opciones-->
</div><!-- Menu-->


<div id="LoginDiv">
<%
	if(session.getAttribute("LoggedIn") != null){
	boolean isLoggedIn = (Boolean)session.getAttribute("LoggedIn");
		if(isLoggedIn){
%>
	<table>
		<tr><td colspan="3"><%= (String)session.getAttribute("UserName") %></td></tr>
		<tr><td><a href="/register_location.jsp">Register Location</a></td><td><a href="/register_device.jsp">Register a Device</a></td></tr>
		<tr><td colspan="3"><a href="/log_out">Log Out</a></td></tr>
	</table>
<%
		}
	}else{
%>
	<form action="/login" method="post">
    	<table>
        	<tr>
            	<td>Username</td>
                <td><input type="text" name="username" /></td>
                <td>Password</td>
                <td><input type="password" name="password" /></td>
            </tr>
            <tr>
				<td><input type="submit" value="LogIn" /></td>
                <td><input type="reset" value="Restore Fields" /></td>
                <td colspan="2"><a href="/registration.jsp">Register a User</a></td>
            </tr>
        </table>
    </form>
<%
	}
%>
</div>

<div id="centro">
<!-- InstanceBeginEditable name="Body" -->
<div id="help">
	<p>Where I Was was created for a Prototype model for Mobile computing class imparted by M.C. Juan Francico Garcilazo Ortiz.</p>
    <p>The main idea of this project is to provide user around the globe a fast and easy to use GPS Location Manager, in this first prototype it'll only run on Android Platforms, if maintenance is given it might run on other Platforms such as iOS and BBOs.</p>
    <p>Ways to use Where I Was:</p>
    <ul>
    	<li>Register a User</li>
        <li>Download WhereIWas Package for Android Devices</li>
        <li>Register your Android Device through WhereIWas Android App</li>
        <li>Configure WhereIWas App over Android</li>
        <li>LogIn through this WebApp</li>
        <li>Click on 'View Log' link (Above)</li>
        <li>View logs of devices Registered through WhereIWas App</li>
        <li>Click on a Log to see it's location over GoogleMaps</li>
    </ul>
    <p>WhereIWas Android App is powered by Android Platforms.<div id="PoweredByAndroid">
<img src="http://1.bp.blogspot.com/_1i7EX7a2ELY/THKCOo4GjQI/AAAAAAAAATg/N-j9SfzyGjk/s200/500px-android-logosvg.png" alt="Powered by Android" height="50" width="50"/>
</div></p>
    <p>Where I Was WebApp is powered by Google App Engine. <img src="https://developers.google.com/appengine/images/appengine-silver-120x30.gif" 
alt="Powered by Google App Engine" /></p>
	<p>Where I Was Prototype by: </p>
    <ul>
    	<li>D.C.S Miguel Alejandro Chan Can</li>
        <li>D.C.S Goretty Aracelly Josefine Cámara Méndez</li>
    </ul>
    <p>D.C.S = Degree in Computer Sciencies</p>
</div>
<!-- InstanceEndEditable -->
</div>
<div id="PoweredByGoogle">
<img src="https://developers.google.com/appengine/images/appengine-silver-120x30.gif" 
alt="Powered by Google App Engine" />
<div id="PoweredByAndroid">
<img src="http://1.bp.blogspot.com/_1i7EX7a2ELY/THKCOo4GjQI/AAAAAAAAATg/N-j9SfzyGjk/s200/500px-android-logosvg.png" alt="Powered by Android" height="50" width="50"/>
</div>
</div>
</div> <!-- fin cuerpo-->
</body>
<!-- InstanceEnd --></html>